(0) Obligation:
Runtime Complexity TRS:
The TRS R consists of the following rules:
walk#1(Nil) → walk_xs
walk#1(Cons(x4, x3)) → comp_f_g(walk#1(x3), walk_xs_3(x4))
comp_f_g#1(comp_f_g(x7, x9), walk_xs_3(x8), x12) → comp_f_g#1(x7, x9, Cons(x8, x12))
comp_f_g#1(walk_xs, walk_xs_3(x8), x12) → Cons(x8, x12)
main(Nil) → Nil
main(Cons(x4, x5)) → comp_f_g#1(walk#1(x5), walk_xs_3(x4), Nil)
Rewrite Strategy: INNERMOST
(1) RenamingProof (EQUIVALENT transformation)
Renamed function symbols to avoid clashes with predefined symbol.
(2) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
walk#1(Nil) → walk_xs
walk#1(Cons(x4, x3)) → comp_f_g(walk#1(x3), walk_xs_3(x4))
comp_f_g#1(comp_f_g(x7, x9), walk_xs_3(x8), x12) → comp_f_g#1(x7, x9, Cons(x8, x12))
comp_f_g#1(walk_xs, walk_xs_3(x8), x12) → Cons(x8, x12)
main(Nil) → Nil
main(Cons(x4, x5)) → comp_f_g#1(walk#1(x5), walk_xs_3(x4), Nil)
S is empty.
Rewrite Strategy: INNERMOST
(3) SlicingProof (LOWER BOUND(ID) transformation)
Sliced the following arguments:
Cons/0
walk_xs_3/0
(4) Obligation:
Runtime Complexity Relative TRS:
The TRS R consists of the following rules:
walk#1(Nil) → walk_xs
walk#1(Cons(x3)) → comp_f_g(walk#1(x3), walk_xs_3)
comp_f_g#1(comp_f_g(x7, x9), walk_xs_3, x12) → comp_f_g#1(x7, x9, Cons(x12))
comp_f_g#1(walk_xs, walk_xs_3, x12) → Cons(x12)
main(Nil) → Nil
main(Cons(x5)) → comp_f_g#1(walk#1(x5), walk_xs_3, Nil)
S is empty.
Rewrite Strategy: INNERMOST
(5) TypeInferenceProof (BOTH BOUNDS(ID, ID) transformation)
Infered types.
(6) Obligation:
Innermost TRS:
Rules:
walk#1(Nil) → walk_xs
walk#1(Cons(x3)) → comp_f_g(walk#1(x3), walk_xs_3)
comp_f_g#1(comp_f_g(x7, x9), walk_xs_3, x12) → comp_f_g#1(x7, x9, Cons(x12))
comp_f_g#1(walk_xs, walk_xs_3, x12) → Cons(x12)
main(Nil) → Nil
main(Cons(x5)) → comp_f_g#1(walk#1(x5), walk_xs_3, Nil)
Types:
walk#1 :: Nil:Cons → walk_xs:comp_f_g
Nil :: Nil:Cons
walk_xs :: walk_xs:comp_f_g
Cons :: Nil:Cons → Nil:Cons
comp_f_g :: walk_xs:comp_f_g → walk_xs_3 → walk_xs:comp_f_g
walk_xs_3 :: walk_xs_3
comp_f_g#1 :: walk_xs:comp_f_g → walk_xs_3 → Nil:Cons → Nil:Cons
main :: Nil:Cons → Nil:Cons
hole_walk_xs:comp_f_g1_0 :: walk_xs:comp_f_g
hole_Nil:Cons2_0 :: Nil:Cons
hole_walk_xs_33_0 :: walk_xs_3
gen_walk_xs:comp_f_g4_0 :: Nat → walk_xs:comp_f_g
gen_Nil:Cons5_0 :: Nat → Nil:Cons
(7) OrderProof (LOWER BOUND(ID) transformation)
Heuristically decided to analyse the following defined symbols:
walk#1, comp_f_g#1
(8) Obligation:
Innermost TRS:
Rules:
walk#1(
Nil) →
walk_xswalk#1(
Cons(
x3)) →
comp_f_g(
walk#1(
x3),
walk_xs_3)
comp_f_g#1(
comp_f_g(
x7,
x9),
walk_xs_3,
x12) →
comp_f_g#1(
x7,
x9,
Cons(
x12))
comp_f_g#1(
walk_xs,
walk_xs_3,
x12) →
Cons(
x12)
main(
Nil) →
Nilmain(
Cons(
x5)) →
comp_f_g#1(
walk#1(
x5),
walk_xs_3,
Nil)
Types:
walk#1 :: Nil:Cons → walk_xs:comp_f_g
Nil :: Nil:Cons
walk_xs :: walk_xs:comp_f_g
Cons :: Nil:Cons → Nil:Cons
comp_f_g :: walk_xs:comp_f_g → walk_xs_3 → walk_xs:comp_f_g
walk_xs_3 :: walk_xs_3
comp_f_g#1 :: walk_xs:comp_f_g → walk_xs_3 → Nil:Cons → Nil:Cons
main :: Nil:Cons → Nil:Cons
hole_walk_xs:comp_f_g1_0 :: walk_xs:comp_f_g
hole_Nil:Cons2_0 :: Nil:Cons
hole_walk_xs_33_0 :: walk_xs_3
gen_walk_xs:comp_f_g4_0 :: Nat → walk_xs:comp_f_g
gen_Nil:Cons5_0 :: Nat → Nil:Cons
Generator Equations:
gen_walk_xs:comp_f_g4_0(0) ⇔ walk_xs
gen_walk_xs:comp_f_g4_0(+(x, 1)) ⇔ comp_f_g(gen_walk_xs:comp_f_g4_0(x), walk_xs_3)
gen_Nil:Cons5_0(0) ⇔ Nil
gen_Nil:Cons5_0(+(x, 1)) ⇔ Cons(gen_Nil:Cons5_0(x))
The following defined symbols remain to be analysed:
walk#1, comp_f_g#1
(9) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
walk#1(
gen_Nil:Cons5_0(
n7_0)) →
gen_walk_xs:comp_f_g4_0(
n7_0), rt ∈ Ω(1 + n7
0)
Induction Base:
walk#1(gen_Nil:Cons5_0(0)) →RΩ(1)
walk_xs
Induction Step:
walk#1(gen_Nil:Cons5_0(+(n7_0, 1))) →RΩ(1)
comp_f_g(walk#1(gen_Nil:Cons5_0(n7_0)), walk_xs_3) →IH
comp_f_g(gen_walk_xs:comp_f_g4_0(c8_0), walk_xs_3)
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(10) Complex Obligation (BEST)
(11) Obligation:
Innermost TRS:
Rules:
walk#1(
Nil) →
walk_xswalk#1(
Cons(
x3)) →
comp_f_g(
walk#1(
x3),
walk_xs_3)
comp_f_g#1(
comp_f_g(
x7,
x9),
walk_xs_3,
x12) →
comp_f_g#1(
x7,
x9,
Cons(
x12))
comp_f_g#1(
walk_xs,
walk_xs_3,
x12) →
Cons(
x12)
main(
Nil) →
Nilmain(
Cons(
x5)) →
comp_f_g#1(
walk#1(
x5),
walk_xs_3,
Nil)
Types:
walk#1 :: Nil:Cons → walk_xs:comp_f_g
Nil :: Nil:Cons
walk_xs :: walk_xs:comp_f_g
Cons :: Nil:Cons → Nil:Cons
comp_f_g :: walk_xs:comp_f_g → walk_xs_3 → walk_xs:comp_f_g
walk_xs_3 :: walk_xs_3
comp_f_g#1 :: walk_xs:comp_f_g → walk_xs_3 → Nil:Cons → Nil:Cons
main :: Nil:Cons → Nil:Cons
hole_walk_xs:comp_f_g1_0 :: walk_xs:comp_f_g
hole_Nil:Cons2_0 :: Nil:Cons
hole_walk_xs_33_0 :: walk_xs_3
gen_walk_xs:comp_f_g4_0 :: Nat → walk_xs:comp_f_g
gen_Nil:Cons5_0 :: Nat → Nil:Cons
Lemmas:
walk#1(gen_Nil:Cons5_0(n7_0)) → gen_walk_xs:comp_f_g4_0(n7_0), rt ∈ Ω(1 + n70)
Generator Equations:
gen_walk_xs:comp_f_g4_0(0) ⇔ walk_xs
gen_walk_xs:comp_f_g4_0(+(x, 1)) ⇔ comp_f_g(gen_walk_xs:comp_f_g4_0(x), walk_xs_3)
gen_Nil:Cons5_0(0) ⇔ Nil
gen_Nil:Cons5_0(+(x, 1)) ⇔ Cons(gen_Nil:Cons5_0(x))
The following defined symbols remain to be analysed:
comp_f_g#1
(12) RewriteLemmaProof (LOWER BOUND(ID) transformation)
Proved the following rewrite lemma:
comp_f_g#1(
gen_walk_xs:comp_f_g4_0(
n199_0),
walk_xs_3,
gen_Nil:Cons5_0(
b)) →
gen_Nil:Cons5_0(
+(
+(
1,
n199_0),
b)), rt ∈ Ω(1 + n199
0)
Induction Base:
comp_f_g#1(gen_walk_xs:comp_f_g4_0(0), walk_xs_3, gen_Nil:Cons5_0(b)) →RΩ(1)
Cons(gen_Nil:Cons5_0(b))
Induction Step:
comp_f_g#1(gen_walk_xs:comp_f_g4_0(+(n199_0, 1)), walk_xs_3, gen_Nil:Cons5_0(b)) →RΩ(1)
comp_f_g#1(gen_walk_xs:comp_f_g4_0(n199_0), walk_xs_3, Cons(gen_Nil:Cons5_0(b))) →IH
gen_Nil:Cons5_0(+(+(1, +(b, 1)), c200_0))
We have rt ∈ Ω(n1) and sz ∈ O(n). Thus, we have ircR ∈ Ω(n).
(13) Complex Obligation (BEST)
(14) Obligation:
Innermost TRS:
Rules:
walk#1(
Nil) →
walk_xswalk#1(
Cons(
x3)) →
comp_f_g(
walk#1(
x3),
walk_xs_3)
comp_f_g#1(
comp_f_g(
x7,
x9),
walk_xs_3,
x12) →
comp_f_g#1(
x7,
x9,
Cons(
x12))
comp_f_g#1(
walk_xs,
walk_xs_3,
x12) →
Cons(
x12)
main(
Nil) →
Nilmain(
Cons(
x5)) →
comp_f_g#1(
walk#1(
x5),
walk_xs_3,
Nil)
Types:
walk#1 :: Nil:Cons → walk_xs:comp_f_g
Nil :: Nil:Cons
walk_xs :: walk_xs:comp_f_g
Cons :: Nil:Cons → Nil:Cons
comp_f_g :: walk_xs:comp_f_g → walk_xs_3 → walk_xs:comp_f_g
walk_xs_3 :: walk_xs_3
comp_f_g#1 :: walk_xs:comp_f_g → walk_xs_3 → Nil:Cons → Nil:Cons
main :: Nil:Cons → Nil:Cons
hole_walk_xs:comp_f_g1_0 :: walk_xs:comp_f_g
hole_Nil:Cons2_0 :: Nil:Cons
hole_walk_xs_33_0 :: walk_xs_3
gen_walk_xs:comp_f_g4_0 :: Nat → walk_xs:comp_f_g
gen_Nil:Cons5_0 :: Nat → Nil:Cons
Lemmas:
walk#1(gen_Nil:Cons5_0(n7_0)) → gen_walk_xs:comp_f_g4_0(n7_0), rt ∈ Ω(1 + n70)
comp_f_g#1(gen_walk_xs:comp_f_g4_0(n199_0), walk_xs_3, gen_Nil:Cons5_0(b)) → gen_Nil:Cons5_0(+(+(1, n199_0), b)), rt ∈ Ω(1 + n1990)
Generator Equations:
gen_walk_xs:comp_f_g4_0(0) ⇔ walk_xs
gen_walk_xs:comp_f_g4_0(+(x, 1)) ⇔ comp_f_g(gen_walk_xs:comp_f_g4_0(x), walk_xs_3)
gen_Nil:Cons5_0(0) ⇔ Nil
gen_Nil:Cons5_0(+(x, 1)) ⇔ Cons(gen_Nil:Cons5_0(x))
No more defined symbols left to analyse.
(15) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
walk#1(gen_Nil:Cons5_0(n7_0)) → gen_walk_xs:comp_f_g4_0(n7_0), rt ∈ Ω(1 + n70)
(16) BOUNDS(n^1, INF)
(17) Obligation:
Innermost TRS:
Rules:
walk#1(
Nil) →
walk_xswalk#1(
Cons(
x3)) →
comp_f_g(
walk#1(
x3),
walk_xs_3)
comp_f_g#1(
comp_f_g(
x7,
x9),
walk_xs_3,
x12) →
comp_f_g#1(
x7,
x9,
Cons(
x12))
comp_f_g#1(
walk_xs,
walk_xs_3,
x12) →
Cons(
x12)
main(
Nil) →
Nilmain(
Cons(
x5)) →
comp_f_g#1(
walk#1(
x5),
walk_xs_3,
Nil)
Types:
walk#1 :: Nil:Cons → walk_xs:comp_f_g
Nil :: Nil:Cons
walk_xs :: walk_xs:comp_f_g
Cons :: Nil:Cons → Nil:Cons
comp_f_g :: walk_xs:comp_f_g → walk_xs_3 → walk_xs:comp_f_g
walk_xs_3 :: walk_xs_3
comp_f_g#1 :: walk_xs:comp_f_g → walk_xs_3 → Nil:Cons → Nil:Cons
main :: Nil:Cons → Nil:Cons
hole_walk_xs:comp_f_g1_0 :: walk_xs:comp_f_g
hole_Nil:Cons2_0 :: Nil:Cons
hole_walk_xs_33_0 :: walk_xs_3
gen_walk_xs:comp_f_g4_0 :: Nat → walk_xs:comp_f_g
gen_Nil:Cons5_0 :: Nat → Nil:Cons
Lemmas:
walk#1(gen_Nil:Cons5_0(n7_0)) → gen_walk_xs:comp_f_g4_0(n7_0), rt ∈ Ω(1 + n70)
comp_f_g#1(gen_walk_xs:comp_f_g4_0(n199_0), walk_xs_3, gen_Nil:Cons5_0(b)) → gen_Nil:Cons5_0(+(+(1, n199_0), b)), rt ∈ Ω(1 + n1990)
Generator Equations:
gen_walk_xs:comp_f_g4_0(0) ⇔ walk_xs
gen_walk_xs:comp_f_g4_0(+(x, 1)) ⇔ comp_f_g(gen_walk_xs:comp_f_g4_0(x), walk_xs_3)
gen_Nil:Cons5_0(0) ⇔ Nil
gen_Nil:Cons5_0(+(x, 1)) ⇔ Cons(gen_Nil:Cons5_0(x))
No more defined symbols left to analyse.
(18) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
walk#1(gen_Nil:Cons5_0(n7_0)) → gen_walk_xs:comp_f_g4_0(n7_0), rt ∈ Ω(1 + n70)
(19) BOUNDS(n^1, INF)
(20) Obligation:
Innermost TRS:
Rules:
walk#1(
Nil) →
walk_xswalk#1(
Cons(
x3)) →
comp_f_g(
walk#1(
x3),
walk_xs_3)
comp_f_g#1(
comp_f_g(
x7,
x9),
walk_xs_3,
x12) →
comp_f_g#1(
x7,
x9,
Cons(
x12))
comp_f_g#1(
walk_xs,
walk_xs_3,
x12) →
Cons(
x12)
main(
Nil) →
Nilmain(
Cons(
x5)) →
comp_f_g#1(
walk#1(
x5),
walk_xs_3,
Nil)
Types:
walk#1 :: Nil:Cons → walk_xs:comp_f_g
Nil :: Nil:Cons
walk_xs :: walk_xs:comp_f_g
Cons :: Nil:Cons → Nil:Cons
comp_f_g :: walk_xs:comp_f_g → walk_xs_3 → walk_xs:comp_f_g
walk_xs_3 :: walk_xs_3
comp_f_g#1 :: walk_xs:comp_f_g → walk_xs_3 → Nil:Cons → Nil:Cons
main :: Nil:Cons → Nil:Cons
hole_walk_xs:comp_f_g1_0 :: walk_xs:comp_f_g
hole_Nil:Cons2_0 :: Nil:Cons
hole_walk_xs_33_0 :: walk_xs_3
gen_walk_xs:comp_f_g4_0 :: Nat → walk_xs:comp_f_g
gen_Nil:Cons5_0 :: Nat → Nil:Cons
Lemmas:
walk#1(gen_Nil:Cons5_0(n7_0)) → gen_walk_xs:comp_f_g4_0(n7_0), rt ∈ Ω(1 + n70)
Generator Equations:
gen_walk_xs:comp_f_g4_0(0) ⇔ walk_xs
gen_walk_xs:comp_f_g4_0(+(x, 1)) ⇔ comp_f_g(gen_walk_xs:comp_f_g4_0(x), walk_xs_3)
gen_Nil:Cons5_0(0) ⇔ Nil
gen_Nil:Cons5_0(+(x, 1)) ⇔ Cons(gen_Nil:Cons5_0(x))
No more defined symbols left to analyse.
(21) LowerBoundsProof (EQUIVALENT transformation)
The lowerbound Ω(n1) was proven with the following lemma:
walk#1(gen_Nil:Cons5_0(n7_0)) → gen_walk_xs:comp_f_g4_0(n7_0), rt ∈ Ω(1 + n70)
(22) BOUNDS(n^1, INF)